/*
*  Copyright 2019-2020 Liu
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package com.liu.modules.business.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import org.hibernate.annotations.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author Liu
* @date 2022-07-03
**/
@Entity
@Data
@Table(name="ejl_cus_user_info")
public class EjlCusUserInfo implements Serializable {

    @Id
    @Column(name = "user_id")
    @ApiModelProperty(value = "用户ID")
    private String userId;

    @Column(name = "usename")
    @ApiModelProperty(value = "用户名")
    private String usename;

    @Column(name = "user_phone")
    @ApiModelProperty(value = "用户手机")
    private String userPhone;

    @Column(name = "user_email")
    @ApiModelProperty(value = "用户邮箱")
    private String userEmail;

    @Column(name = "user_password")
    @ApiModelProperty(value = "用户密码")
    private String userPassword;

    @Column(name = "user_register_date")
    @ApiModelProperty(value = "用户注册时间")
    private String userRegisterDate;

    @Column(name = "user_flag")
    @ApiModelProperty(value = "用户标识")
    private String userFlag;

    @Column(name = "user_last_login_date")
    @ApiModelProperty(value = "用户最后登录时间")
    private String userLastLoginDate;

    public void copy(EjlCusUserInfo source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}